<template>
	<router-view />
</template>

<script setup lang="ts">
import { nextTick, onMounted } from 'vue'
import { RouterView } from 'vue-router'
import { useTitle } from '@vueuse/core'
import { handleThemeStyle } from '@/utils/theme'
import { useAppStore } from '@/store/modules/app'

const appStore = useAppStore()

// 设置标题
useTitle("xWang")

onMounted(() => {
	nextTick(() => {
		// 初始化主题样式
		handleThemeStyle(appStore.theme)
	})
})
</script>
